<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<form id="pagerForm" method="get" model="viewRequest" action="#rel#">
	<input type="hidden" name="viewRequest.page" value="${page.number}" />
	<input type="hidden" name="viewRequest.size" value="${page.size}" />
	<c:forEach items="${viewRequest.params}" var="params">
		<input type="hidden" id="${params.key}" name="viewRequest.params['${params.key}']" value="${params.value}" />
	</c:forEach>
	<c:forEach items="${viewRequest.sort}" var="sort">
		<input type="hidden" name="viewRequest.sort.${sort.key}" value="${sort.value}" />
	</c:forEach>
</form>

<div style="display: none;" class="pageHeader">
	<form rel="pagerForm" onsubmit="return dialogSearch(this);" action="${rootUrl}/goods/goods-sku?goodsId=${goodsId}" method="get">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>商品名称：</label>
				<input type="text" name="viewRequest.params['name_like']" value="${viewRequest.params.name_like}"/>
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<%-- <li><a class="button" href="${rootUrl}/goods/goodsSku!search" target="searchDialog" targetType="dialog" parentDialogId="goods" mask="true" title="查询框"><span>高级检索</span></a></li> --%>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<table class="table" targetType="dialog"  width="100%" layoutH="75">
		<thead>
			<tr>
				<th width="30" align="center" >序号</th>
				<th width="160">名称</th>
				<th width="160">规格</th>
				<th width="160">子标题</th>
				<th width="120">库存</th>
				<th width="40">点击量</th>
				<th width="40">销售量</th>
				<th width="40">收藏数</th>
				<th width="40">重量</th>
				<th width="40">状态</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.content}" var="sku" varStatus="status">
			<tr target="data_id" rel="${sku.id}">
				<td>${status.count}</td>
				<td>${sku.goods.name }</td>
				<td>${sku.specName }</td>
				<td>${sku.subTitle }</td>
				<td>${sku.inventory }</td>
				<td>${sku.click }</td>
				<td>${sku.salenum }</td>
				<td>${sku.collect }</td>
				<td>${sku.weight }</td>
				<td><c:if test="${sku.state == 0}">下架</c:if><c:if test="${sku.state == 1}">正常</c:if>
					<c:if test="${sku.state == 2}">封存</c:if><c:if test="${sku.state == 3}">赠品</c:if></td>
				<td>
					<a class="btnSelect" href="javascript:$.bringBack({id:'${sku.id}',name:'${sku.goods.name }'})" title="查找带回">选择</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="${page.size}">${page.size}</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${page.totalElements}条 </span>
		</div>
		<div class="pagination" targetType="dialog" totalCount="${page.totalElements}" numPerPage="${page.size}" pageNumShown="10" currentPage="${page.number}"></div>
	</div>
</div>